Skip to content

Bundle a discoverable gh api skill for GitHub issues and pull requests - #6658

Merged
freeqaz-openai merged 4 commits into
mainfrom
feat/bundled-repository-rest-skill
Nov 20, 2026
Merged

freeqaz-openai merged 4 commits into
mainfrom
feat/bundled-repository-rest-skill

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Draft — human approval required before merge.

A Codex agent working in a configured GitHub repository should be able to find the right REST endpoint and call it with stock gh api. The runtime installs the skill in Codex’s standard admin skill directory. Operators can use it without creating a symlink or enabling it for each revision. Operator guide

The skill teaches one pattern for issue and PR work. It shows how to inspect either resource, post a conversation comment on a PR using the issue comments endpoint, and choose the route and JSON fields for other actions. Writes use gh api --input with a JSON file and require independent confirmation of the result.

Discovery and access are separate. Codex can discover the instructions in the shared runtime image. The deployed binding and network policy authorize each operation. For example, scoped REST v1 allows issue reads and PR creation with the required grants. Posting comments requires a policy that permits the comments endpoint. Ref- and draft-constrained grants retain their designated client.

Verification

  • The skill validator, documentation build and link checks, specification checks, formatting and whitespace checks passed locally. The packaging probe now requires exactly one enabled skill in a fresh non-root Codex home through skills/list.
  • On macOS ARM64, checksum-verified stock gh 2.103.2 sent the complete JSON file once to a loopback server. The command succeeded on HTTP 201 and refused 307/308 without resending the POST. Other redirects can result in a GET, so check the intended repository for the result before retrying an uncertain write.
  • Required CI and native image checks are tracking this revision. A saved-agent run on the rebuilt image remains to be verified. The previous 49/49 result was for the earlier opt-in skill at 092aa4df.

Keep the instructions outside automatic discovery. A repository Git grant is not REST authority, and a general pull request write grant is not draft-only. Verify explicit opt-in and removal in the native Codex packaging check.
@freeqaz-openai freeqaz-openai added the agent-created PR opened by an AI agent; does not identify the reviewer or approver. label Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 20, 2026
@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR bundles an automatically discoverable Codex skill for GitHub issue and pull-request work with stock gh api.

Example: An Agent is asked to comment on pull request 123 in openclaw/openclaw-enterprise.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The direction and focused implementation are useful, but final-workflow proof is incomplete and one previously reported instruction requirement remains unresolved.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An Agent with configured repository access lacks discoverable runtime guidance for choosing REST endpoints for issue and pull-request tasks.
Reason: The small addition follows explicit collaborator feedback to make the skill discoverable and cover issue/PR operations, while preserving deployed access restrictions.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: automatic discovery follows recorded owner feedback and adds useful guidance absent from current main; one previously reported instruction-provenance finding remains.

Priority: P3
Reviewed head: 8fb9770e015a3a542e6717c0331b8c5711efab6e

Before merge

  • [P2] Cite the incidents behind the mandatory skill rules (P2) - The skill still adds mandatory write, credential, and response-handling rules without linking a motivating issue, PR, or commit. The review procedure explicitly requires those references for new skill rules, and this repeats the unresolved finding from the earlier review. Add concise references beside the retained rules so their scope and rationale can be checked without reconstructing this discussion.

Findings

  • [P2] [P2] Cite the incidents behind the mandatory skill rules — deploy/runtime/repository-credentials/github-repository-rest/SKILL.md:31-33

Tests

  • Missing end-to-end proof: Provide redacted output or a recording of a saved Agent on the rebuilt image discovering the skill without opt-in and completing a permitted gh api task, including discovery with an existing home whose settings remain intact.
Agent review details

How this fits together

The runtime image supplies instructions to Codex; Codex uses gh api for repository operations, while existing credential and network policies determine which requests succeed.

flowchart TB
  A[Runtime image] --> B[Admin skill directory]
  B --> C[Codex skill discovery]
  C --> D[gh api request]
  D --> E[Deployed access policy]
  E --> F[GitHub REST API]
Loading

Technical review

Best possible solution:

Keep the existing discovery and authorization owners, and attach concrete incident references to the retained mandatory skill rules.

Do we have a high-confidence way to reproduce the issue?

This is a skill addition; source inspection confirms fetched main lacks the bundled discovery path, and no target code was executed.

Is this the best way to solve the issue?

Installing a small instruction file through Codex's existing admin discovery path is proportionate and follows the recorded reviewer direction without duplicating authorization machinery.

Full review comments:

  • [P2] [P2] Cite the incidents behind the mandatory skill rules — deploy/runtime/repository-credentials/github-repository-rest/SKILL.md:31-33
    The skill still adds mandatory write, credential, and response-handling rules without linking a motivating issue, PR, or commit. The review procedure explicitly requires those references for new skill rules, and this repeats the unresolved finding from the earlier review. Add concise references beside the retained rules so their scope and rationale can be checked without reconstructing this discussion.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0f4a2d3d3ad1.

Provenance checked

  • Runtime image layer placement keeps the original intent (d36acf7: The cached credential-client tree remains the final filesystem layer so client-only changes avoid rebuilding preceding runtime layers.)
  • Native Codex packaging probe keeps the original intent (e94ec77: The TypeScript conversion preserves real container probes and native plugin-policy checks; this PR extends that probe without removing those checks.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm docs:check
  • git diff --check

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves Agent guidance and discoverability without establishing an urgent runtime regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-20T01:52:42.908Z sha 1208ca0 :: needs changes before merge. :: [P2] [P2] Give a safe next action when an issue read fails | [P2] [P2] Cite the incidents behind the new mandatory skill rules

Reviewed November 20, 2026, 6:35 PM ET / 23:35 UTC (Revision 2).

Install the instructions directly in the runtime stage. The previous staged copy made /usr non-traversable to the runtime user. Give operators a next step on a denied issue read without exposing the raw error.
Use queryless issue reads and require an explicit repository match for each non-draft creation. Leave authorization with the deployed scoped REST policy and hook. Do not replay a POST after an ambiguous outcome or change the ref-constrained draft path.
@freeqaz-openai freeqaz-openai changed the title Bundle an optional GitHub issue-read skill for stock gh Add opt-in GitHub skill for issue reads and scoped PR creation Nov 20, 2026
description: Read GitHub issues with gh api, or open a non-draft PR with curl if the deployed repository grant allows it.
---

Use this skill only when the operator confirms the **deployed** Agent revision

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is terrible ux. agents should just always use this when repos are configured

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 8fb9770. The runtime installs the skill in Codex’s admin skill directory, so agents can discover it automatically and use it for configured repos. The packaging check starts Codex with a fresh home and checks that the skill is enabled. Packaging check

@freeqaz-openai freeqaz-openai changed the title Add opt-in GitHub skill for issue reads and scoped PR creation Bundle a discoverable gh api skill for GitHub issues and pull requests Nov 20, 2026
@freeqaz-openai

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@freeqaz-openai
freeqaz-openai marked this pull request as ready for review November 20, 2026 23:55
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 20, 2026 23:55
@freeqaz-openai
freeqaz-openai merged commit 0cb2174 into main Nov 20, 2026
50 checks passed
@freeqaz-openai
freeqaz-openai deleted the feat/bundled-repository-rest-skill branch November 20, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-created PR opened by an AI agent; does not identify the reviewer or approver. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants